﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace ProcKill
{
    class Program
    {
        static void Main(string[] args)
        {
            foreach (String arg in args)
            {
                Process[] wordProcesses = Process.GetProcessesByName("WINWORD");
                for (int i = 0; i < wordProcesses.Length; i++)
                {
                    Process p = wordProcesses[i];
                    String windowTitle = p.MainWindowTitle;
                    if (arg.Equals(windowTitle))
                    {
                        p.Kill();
                    }
                }
            }
        }
    }
}
